<template>
  <div class="wft-w-h-100">
    <van-grid :column-num="attrs.col" :border="attrs.border">
      <van-grid-item
        v-for="item in value"
        :key="item.id"
        :icon="item[attrs.iconKey]"
        :text="item[attrs.labelKey]"
      />
    </van-grid>
  </div>
</template>
<script setup lang='ts'>
import { useAttrs, useTempValue } from 'generator/hooks'

const props = defineProps<{
  panelJson: TPanel
  curComp: TComp
}>()

const attrs = useAttrs(props.curComp.attrs)

const value = useTempValue(attrs, props.curComp, props.panelJson)
</script>
<style scoped>
.wft-w-h-100 {
  width: 100%;
  height: 100%;
}
</style>